#pragma once

#include "intersection.h"
#include "ray.h"
#include "matNone.h"
#include "matLambert.h"
#include "matPhong.h"
#include "matBlinn.h"
#include "matOrenNayer.h"
#include "matGlass.h"
#include "matMirror.h"

class primitive
{
public:

	primitive();
	primitive(const char* _name);

	~primitive();

	unsigned int ObjectID;
	static int nextObjectID;

	void setName(const char* _name);
	std::string getName();
	material *surfaceMaterial;

	material* getMaterial();
	void setMaterial(material* other);

	virtual int intersect( ray& Ray, intersection& inter);
	virtual bool isInShade( ray& Ray );
	virtual vector3 getNormal(point inPoint);
	virtual void getTextureCoords(intersection& inter);

	virtual double maxX();
	virtual double minX();
	virtual double maxY();
	virtual double minY();
	virtual double maxZ();
	virtual double minZ();

protected:
	std::string name;

};